/**
 * All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
 * <p>
 * MeetTaskMasterActionAuto
 * 任务信息主表
 * <p>
 * 修改纪录
 * 2020-08-31 版本：1.0 shenyouyi 创建。
 *
 * @version 版本：1.0
 * @author 作者：shenyouyi
 * 创建日期：2020-08-31
 */

package com.topscomm.meet.controller.auto;

import com.topscomm.meet.MeetController;
import com.topscomm.meet.pojo.MeetTaskMasterEntity;
import com.topscomm.meet.service.IMeetTaskMasterService;
import com.topscomm.pub.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public class MeetTaskMasterControllerAuto extends MeetController<MeetTaskMasterEntity, IMeetTaskMasterService> {

    /**
     * @author: shenyouyi
     * @date: 2020-08-31
     * @param: paraMap
     * @return
     * @description: 获取编码值列表
     * @modify:
     */
    @Override
    @GetMapping(value = "/dataCodeList")
    public ResponseResult<Object> dataCodeList(@RequestParam(required = false) Map<String, Object> paraMap) {
        super.dataCodeList(paraMap);
        Map<String, Object> codeMap = this.service.searchCodeMapFromOA();
        List<Map<String, Object>> enabledList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
        codeMap.put("enabledList", enabledList);
        List<Map<String, Object>> stateList = datacodeCache.getCodeListMap("MeetMasterState", "", "sortcode");
        codeMap.put("stateList", stateList);
        return ResponseResult.ok(codeMap);
    }
}
